<template>
    <Child :count="count" @click="handlClick" />
</template>

<script>
import { reactive, toRefs } from 'vue';
import Child from './04-emits-child';

export default {
    components: {
        Child,
    },
    setup () {
        const state = reactive({
            count: 1,
        });
        return {
            ...toRefs(state),
        };
    },
    methods: {
        handlClick (num) {
            console.log(num);
            this.count = num;
        },
    },
};
</script>

<style>
</style>
